package com.heima.apis.article.fallback;

import com.heima.apis.article.IArticleClient;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.article.pojos.ApArticleConfig;
import com.heima.model.article.pojos.ApCollection;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import com.heima.model.wemedia.dtos.WmCommentListDto;
import com.heima.model.wemedia.dtos.WmStatistics3Dto;
import com.heima.model.wemedia.pojos.WmNewsStatistics;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class IArticleClientFallback implements IArticleClient {

    @Override
    public ResponseResult saveAppArticle(ArticleDto articleDto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }

    @Override
    public Integer findCount(WmStatistics3Dto wmStatistics3Dto) {
        return 0;
    }

    @Override
    public ResponseResult commentList(WmCommentListDto wmCommentListDto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }

    @Override
    public ApArticle findArticle(Long articleId) {
        return new ApArticle();
    }

    @Override
    public List<WmNewsStatistics> findByPublishTime(WmStatistics3Dto wmStatistics3Dto) {
        return null;
    }

    @Override
    public ApArticleConfig findArticleConfig(Long articleId) {
        return null;
    }

    @Override
    public ApCollection findArticleCollectionById(Long articleId) {
        return null;
    }
}
